<%@ Page Language="C#" EnableViewState="false" ValidateRequest="false" AutoEventWireup="true"
	Inherits="Syrinx.Gui.AspNet.Ajax.NitobiBasePage" MasterPageFile="~/App_ThemeMasters/NoStyle/AdminOneColumnLayout.Master" %>

<%@ Register Assembly="Swaf.Gui.AspNet2" Namespace="Swaf.Gui.AspNet2" TagPrefix="swf" %>
<%@ Register Assembly="ScsAspNet" Namespace="Syrinx.Gui.AspNet.Ajax" TagPrefix="saj" %>
<%@ Register Assembly="NitobiControls" Namespace="Nitobi" TagPrefix="ntb" %>
<!--#include file="~/SiteControls/RegisterStandardControls.txt"-->
<!--#include file="../SiteControls/StandardAdminHeaderPageContent.inc"-->
<!--#include file="../SiteControls/StandardFooterPageContent.inc"-->

<script runat="server">
	public string TitleFormat = "$company.name$ - Deleted Product Management";
</script>

<asp:Content ContentPlaceHolderID="title" runat="server" ID="c1">
	<%SecurityPrivilege = "AppFunctions.ManageProducts"; %>
	<h1 runat="server" id="currencyConvertLbl">
		Deleted Product Management</h1>
	<div class="HelpBtnArea" style="float: right">
		<asp:HyperLink runat="server" ID="_pageHelp" NavigateUrl="../std/Help.aspx?helpid=ProductManagementHelp"
			Target="help">Help</asp:HyperLink>
	</div>
	<swf:BizProc ID="sArt1" runat="server" FactoryName="eComProducts">
		<State pid="" objectTreeName="DeletedeComProd" includeSelf="true" entireTree="true" EditModeSessionKey="" />
		<ParentBizProc id="loginBP" />
	</swf:BizProc>
	<swf:BizProc ID="prodTax" runat="server" FactoryName="eComProductTaxes">
		<ParentBizProc id="sArt1" fieldName="id" dataId="pid" />
	</swf:BizProc>
	<swf:BizProc ID="prodDisc" runat="server" FactoryName="eComProductQuantityDiscounts">
		<ParentBizProc id="sArt1" fieldName="id" dataId="pid" />
	</swf:BizProc>
	<swf:BizProc ID="codedDisc" runat="server" FactoryName="eComProductCodedDiscounts">
		<ParentBizProc id="sArt1" fieldName="id" dataId="pid" />
	</swf:BizProc>
	<swf:BizProc ID="boxes" runat="server" FactoryName="productSecificBoxes">
		<ParentBizProc id="sArt1" fieldName="id" dataId="pid" />
	</swf:BizProc>
</asp:Content>
<asp:Content ContentPlaceHolderID="mainContent" runat="server" ID="c3">
    <script type="text/javascript">
    	function toggleTabs(cId, c1, dId) {
    		var a; for (i = 1; ; i++) {
    			a = document.getElementById(cId + i); b = document.getElementById(dId + i); if (a == null || a == '') break;
    			if (i == c1) { a.className = 'currenttab'; b.style.display = 'block'; } else { a.className = ''; b.style.display = 'none'; } 
    		} 
    	}
	</script>

    <span class="button5"><saj:ActionButton runat="server" ID="deleteBtn" Actions="sArt1.DeleteBizObj" Text="Delete" ClientClick="if(!confirm('Are you sure you want to delete?  This will perminantly delete the article and it wont be recoverable.'))return false;"/></span>
    <span class="button5"><saj:ActionButton runat="server" ID="undeleteBtn" Actions="sArt1.UndeleteBizObj" Text="Un-Delete" ClientClick="if(!confirm('Are you sure you want to Restore this article back?'))return false;"/></span>

	<table width="adminPageWidth">
		<tr>
			<td>
				<div class="SimpleVerticalBg">
					<saj:Grid ID="articleList1Display" runat="server" Width="350px" Height="600px" ShowToolbar="false"
						Resizable="Both" ParentBizProcIds="sArt1" Mode="LiveScrolling">
						<Columns>
							<ntb:KeyColumn DataField="id" />
							<ntb:BoundColumn DataField="depthName" HeaderText="Name" Width="330" />
						</Columns>
					</saj:Grid>
				</div>
			</td>
			<td class="adminRightContentWidth">
				<div class="clearer">
				</div>
				<div class="tabs" style="padding-left: 10px; padding-right: 10px;">
					<ul>
						<li id="t1" class="currenttab">
							<div class="firstTab">
								<swf:DivLayers runat="server" ID="tl1" SkinID="Tab">
									<asp:HyperLink onclick="toggleTabs('t','1','xfd');" runat="server" ID="_cmpMngrTab1"
										Text="Product Description" NavigateUrl="javascript:;" /></swf:DivLayers>
							</div>
						</li>
						<li id="t2">
							<div>
								<swf:DivLayers runat="server" ID="tl2" SkinID="Tab">
									<asp:HyperLink runat="server" onclick="toggleTabs('t','2','xfd');" ID="_cmpMngrTab2"
										Text="Product Details" NavigateUrl="javascript:;" /></swf:DivLayers>
							</div>
						</li>
						<li id="t3">
							<div class="lastTab">
								<swf:DivLayers runat="server" ID="tl3" SkinID="Tab">
									<asp:HyperLink runat="server" onclick="toggleTabs('t','3','xfd');" ID="_cmpMngrTab3"
										Text="Shipping Options" NavigateUrl="javascript:;" /></swf:DivLayers>
							</div>
						</li>
					</ul>
				</div>
				<div class="clearer">
				</div>
				<swf:DivLayers ID="mdl1" runat="server" SkinID="MainTabArea">
					<div id="xfd1">
						<saj:NitobiBizObjDisplay ID="ad1" runat="server" ReadOnlyTemplate="eCom.Gui.AspNet.ProductRODisplay"
							EditableTemplate="eCom.Gui.AspNet.ProductRWDisplay-NEW" ParentBizProcIds="sArt1">
							<macros>
								<Entry name="navLink" type="String">../std/ArticleView.aspx?gArt1pid=$pid$&amp;gArt1id=$id$</Entry>
								<Entry name="imageRes" type="String">Thumbnail</Entry>
							</macros>
						</saj:NitobiBizObjDisplay>
					</div>
					<div id="xfd2" style="display: none">
						<saj:NitobiBizObjDisplay ID="ad2" runat="server" ReadOnlyTemplate="eCom.Gui.AspNet.ProductDetailsROView"
							EditableTemplate="eCom.Gui.AspNet.ProductDetailsRWView" ParentBizProcIds="sArt1">
							<macros>
								<Entry name="navLink" type="String">../std/ArticleView.aspx?gArt1pid=$pid$&amp;gArt1id=$id$</Entry>
								<Entry name="imageRes" type="String">Thumbnail</Entry>
							</macros>
						</saj:NitobiBizObjDisplay>
						
						<h3><asp:Label runat="server" ID="_tax">Product Taxes</asp:Label></h3>
						<saj:ComplexBizObjListDisplay ID="pt1" runat="server" ParentBizProcIds="prodTax"
							ReadOnlyTemplate="eCom.Gui.AspNet.ProductTaxListDisplay">
						</saj:ComplexBizObjListDisplay>
						
						<h3><asp:Label runat="server" ID="_qP">Quantity Price Discounts</asp:Label></h3>
						<saj:ComplexBizObjListDisplay ID="pq1" runat="server" ParentBizProcIds="prodDisc"
							ReadOnlyTemplate="eCom.Gui.AspNet.ProductQuantityDiscountListDisplay">
						</saj:ComplexBizObjListDisplay>

						<h3><asp:Label runat="server" ID="Label1">Coded Price Discounts</asp:Label></h3>
						<saj:ComplexBizObjListDisplay ID="pcq1" runat="server" ParentBizProcIds="codedDisc"
							ReadOnlyTemplate="eCom.Gui.AspNet.ProductCodedDiscountListDisplay">
						</saj:ComplexBizObjListDisplay>
					</div>
					<div id="xfd3" style="display: none">
						<saj:NitobiBizObjDisplay ID="shipOp" runat="server"
							EditableTemplate="eCom.Gui.AspNet.ProductShippingOptionsRWDisplay" ParentBizProcIds="sArt1" />
						
						<saj:Grid ID="Grid1" runat="server" Width="400px" Height="250px" AllowAddRow="true"
							AllowDeleteRow="true" ShowToolbar="true" Resizable="Both" ParentBizProcIds="boxes"
							Mode="LiveScrolling">
							<Columns>
								<ntb:KeyColumn DataField="id" />
								<ntb:BoundColumn DataField="maxWeight.amount" HeaderText="Weight" Width="50" ReadOnly="false" />
								<ntb:BoundColumn DataField="maxWeight.unit" HeaderText="unit" Width="40" ReadOnly="false" />
								<ntb:BoundColumn DataField="dimensions.width.amount" HeaderText="Width" Width="50" ReadOnly="false" />
								<ntb:BoundColumn DataField="dimensions.width.unit" HeaderText="unit" Width="40" ReadOnly="false" />
								<ntb:BoundColumn DataField="dimensions.length.amount" HeaderText="Length" Width="50" ReadOnly="false" />
								<ntb:BoundColumn DataField="dimensions.length.unit" HeaderText="unit" Width="40" ReadOnly="false" />
								<ntb:BoundColumn DataField="dimensions.depth.amount" HeaderText="Depth" Width="50" ReadOnly="false" />
								<ntb:BoundColumn DataField="dimensions.depth.unit" HeaderText="unit" Width="40" ReadOnly="false" />
							</Columns>
						</saj:Grid>
					</div>
				</swf:DivLayers>
				<div class="clearer">
				</div>
				<span class="button6">
					<saj:ActionButton runat="server" ID="ActionButton1" Actions="sArt1.UpdateBizObj,prodDisc.UpdateBizObj,codedDisc.UpdateBizObj,prodTax.UpdateBizObj"
						Text="Update" /></span>
			</td>
		</tr>
	</table>
</asp:Content>
